﻿using System;
using System.IO;

namespace OpenLS.Spreadsheet.Formats.Biff.OfficeArt
{
    internal class OfficeArtTertiaryFOPT : OfficeArtRecord
    {
        private OfficeArtRGFOPTE _rgfopte;

        public override RecType RecordType
        {
            get { return RecType.OfficeArtTertiaryFOPT; }
        }

        protected override void ReadNoHeader(OfficeArtReadContext context)
        {
            _rgfopte = new OfficeArtRGFOPTE();
            _rgfopte.Read(context.Reader, rhrecInstance, rhrecLen);
        }


        protected override byte Version
        {
            get { return 0x3; }
        }

        protected override int ByteLength
        {
            get { return _rgfopte.ByteLength; }
        }

        protected override void WriteNoHeader(OfficeArtWriteContext context)
        {
            _rgfopte.Write(context.Writer);

        }

        public object GetOptionalProperty(OpId id)
        {
            return _rgfopte.GetOptionalProperty(id);
        }
    }
}